#ifndef MATCHPROCPARAMCOLLECTDATA_H
#define MATCHPROCPARAMCOLLECTDATA_H
#include "BaseData.h"


struct ParamList
{
    std::string key;
    std::string value;
    std::string seq;
    std::string location;
};


struct ParamInfo
{
    std::string pcu;
    std::list<ParamList> paramList;

    void operator=(const ParamInfo& info)
    {
        this->pcu = info.pcu;

        for(const auto&item:info.paramList)
        {
            this->paramList.push_back({
                item.key,
                item.value,
                item.seq,
                item.location
            });
        }
    }
};

class MatchProcParamCollectData
{
public:
    void setPcu(const std::string& pcu){this->pcu=pcu;}
    void setParamList(const std::list<ParamList>& params){
        for(const auto& item:params){
            this->params.push_back({item.key,item.value,item.seq,item.location});
        }
    }

    void setWorkStep(const std::string& workStep){this->workStep = workStep;}
    void setLocation(const std::string& location){this->location = location;}

    std::string getPcu()const{return pcu;}
    std::list<ParamList> getParamList()const{ return this->params; }

    std::string getWorkStep()const{return workStep;}
    std::string getLocation()const{return location;}

    std::list<ParamInfo> getParamInfo(){
        return  paramInfo;
    }
    void setParamInfo(const std::list<ParamInfo>& paramInfo){
        this->paramInfo = paramInfo;
    }

    std::string XRayIlluminationVoltage()const{return XRay_IlluminationVoltage;}
    std::string XRayNeedleGaugeCalibrationDiameter()const{return XRay_NeedleGaugeCalibrationDiameter;}
    std::string XRayCellQrCode()const{return XRay_CellQrCode;}
    std::string XRayDetectionStartTime()const{return XRay_DetectionStartTime;}
    std::string XRayDetectionCompletionTime()const{return XRay_DetectionCompletionTime;}
    std::string XRayCorner01NegativeCoveringPositive()const{return XRay_Corner01_NegativeCoveringPositive;}
    std::string XRayCorner02NegativeCoveringPositive()const{return XRay_Corner02_NegativeCoveringPositive;}
    std::string XRayCorner03NegativeCoveringPositive()const{return XRay_Corner03_NegativeCoveringPositive;}
    std::string XRayCorner04NegativeCoveringPositive()const{return XRay_Corner04_NegativeCoveringPositive;}

private:
    friend class BaseData<MatchProcParamCollectData>;

    MatchProcParamCollectData()=default;
    std::string workStep;
    std::string location;
    std::string pcu;
    std::list<ParamList> params;

    std::list<ParamInfo> paramInfo;

    const std::string XRay_IlluminationVoltage = "XRay_IlluminationVoltage";
    const std::string XRay_NeedleGaugeCalibrationDiameter = "XRay_NeedleGaugeCalibrationDiameter";
    const std::string XRay_CellQrCode = "XRay_CellQrCode";
    const std::string XRay_DetectionStartTime = "XRay_DetectionStartTime";
    const std::string XRay_DetectionCompletionTime = "XRay_DetectionCompletionTime";
    const std::string XRay_Corner01_NegativeCoveringPositive = "XRay_Corner01_NegativeCoveringPositive";
    const std::string XRay_Corner02_NegativeCoveringPositive = "XRay_Corner02_NegativeCoveringPositive";
    const std::string XRay_Corner03_NegativeCoveringPositive = "XRay_Corner03_NegativeCoveringPositive";
    const std::string XRay_Corner04_NegativeCoveringPositive = "XRay_Corner04_NegativeCoveringPositive";
};

#endif // MATCHPROCPARAMCOLLECTDATA_H
